#! /usr/bin/env python
# encoding=utf-8

from xmlrpclib import ServerProxy

username = 'aapugr'
password = 'ugr_aap'

server = ServerProxy('http://aapugr.wordpress.com/xmlrpc.php')
post = server.metaWeblog.getRecentPosts(1, username, password, 1)[0]

print 'Último post:', post['postid']
print 'Título:', post['title']
print 'Texto:'
print post
print post['description']

post['description'] = 'nuevo texto'

print
print 'Nuevo texto:'
print
print post['description']

server.metaWeblog.editPost(post['postid'], username, password, post)
